<?php
/*
	监听电商客订单状态变更事件
*/
defined('BY_JYA') or exit('error');
$type=$event['type'];
$order=$event['order'];
if(!$type){
	return;
}
if($type=='pay'){
	//付款事件
	$goods = pdo_getall('jy_weishop_order_goods',array('orderid'=>$order['id'],'isseckill'=>1,'uniacid'=>$_SESSION['uniacid']));
	if(empty($goods) || count($goods)==0){
		return;
	}
	foreach($goods as $g){
		$item=pdo_get('jy_seckill_task_goods',array('goodsid'=>$g['goodsid']));
		if($item['id']){
			$ispass=true;
		}
	}
	if($ispass){
		$this->model('model')->setOrderPay($order['id']);
	}
}
if($type=='send_goods'){
	//发货	
}
if($type=='receive_goods'){
	//收货
	
}
if($type=='complete'){
	//完成
	
}
